
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>我爱大重庆-新闻咨询-添加模块</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css">
    <style>
        .container-fluid{
            margin:10px 20px;
            border:1px solid #ccc;
            border-radius: 5px;
        }
        #submit{
            margin-bottom:20px;
        }
    </style>
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-lg-12 col-md-12 col-xs-12">
            <h3>分类栏目添加添加</h3>
        </div>
        <p></p>
        <table class="table">
            <tr>
                <td>名称</td>
                <td>链接</td>
            </tr>
            <tr>
                <form action="{:U('News/column')}" method="post">
                    <td width="50%"><input type="text" name="title"> </td>
                    <td><button class="btn btn-info click" onclick="javascript:submit()">添加</button></td>
                </form>
            </tr>
            <foreach name="column" item="column">
                <tr>
                    <td>{$column['title']}</td>
                <td>
                    http://weixin.weirongm.com/DaChongQing/News/GetCode/column/{$column['id']}
                </td>
            </foreach>
        </table>
    </div>
</div>
<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
    $(function(){
        $('.click').click(function(){
            var tpl = "<tr><td colspan='2'><input type='text' name='title'></td></tr>";
            $('.before').html(tpl);
        })
    })
</script>
</body>
</html>